home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 4 / BBS in a Box - Macintosh - Volume IV (January 1992) (BBS in a Box).iso / Files / Prog / M / MacOberon.cpt / MacOberon122.sit / Oberon.Header.ps / Oberon.Header.ps
Encoding:
Text File  |  1990-07-09  |  3.7 KB  |  197 lines  |  [TEXT/EDIT]

  1. %!
  2. %    Oberon PostScript Header File
  3. %
  4. %    Adjust Font Translation Tables in this Document
  5. %    According to Your Preferences.
  6. %    PostScript Versions of Oberon Fonts will be
  7. %    Available at some Later Date.
  8. %
  9. % m  moveto  x y -> -
  10. % s  String  s -> -
  11. % l  Line  x y w h -> -
  12. % x  XLine  x y dx dy -> -
  13. % c  scaled Circle  x y a b -> -
  14. % b  shaded box  x y w h col -> -
  15. % i  pattern image  x y w h mode  -> -
  16. % p  Page  n -> -
  17. % f  font mapping  fnt -> -
  18.  
  19. /m {moveto} def
  20. /s {show} def
  21.  
  22. /l
  23.   { /ph exch def
  24.     /pw exch def
  25.     newpath
  26.     moveto
  27.     pw 0 rlineto
  28.     0 ph rlineto
  29.     pw neg 0 rlineto
  30.     closepath
  31.     0 setgray
  32.     fill
  33.   } def
  34.  
  35. /x
  36.   { /dy exch def
  37.     /dx exch def
  38.     newpath
  39.     moveto
  40.     dx dy rlineto
  41.     0 setlinewidth
  42.     stroke
  43.   } def
  44.  
  45. /c
  46.   { /pb exch def
  47.     /pa exch def
  48.     newpath
  49.     gsave
  50.     translate
  51.     1 pb pa div scale
  52.     0 0 pa 0 360 arc
  53.     0 setlinewidth
  54.     stroke
  55.     grestore
  56.   } def
  57.  
  58. /maxwh
  59.   { pw ph gt {/max pw def} {/max ph def} ifelse
  60.   } def
  61.  
  62. /shade
  63.   { col 0 eq {1 setgray} if
  64.     col 1 eq {0.99 setgray} if
  65.     col 2 eq {0.9 setgray} if
  66.     col 3 eq {0.65 setgray} if
  67.     col 4 eq {0.35 setgray} if
  68.     col 5 eq {0 setgray} if
  69.     fill
  70.   } def
  71.  
  72. /texture
  73.   { gsave
  74.     clip
  75.     newpath
  76.     col 6 eq
  77.       { px py ph add moveto
  78.         maxwh
  79.         max 10 idiv 1 add
  80.           { max max rlineto
  81.             max neg dup 20 sub rmoveto
  82.           } repeat
  83.       } if
  84.     col 7 eq
  85.       { px py moveto
  86.         maxwh
  87.         max 10 idiv 1 add
  88.           { max neg max rlineto
  89.             max 20 add max neg rmoveto
  90.           } repeat
  91.       } if
  92.     col 8 eq
  93.       { px py moveto
  94.         pw 15 idiv 1 add
  95.           { 0 ph rlineto
  96.             15 ph neg rmoveto
  97.           } repeat
  98.      } if
  99.     col 9 eq
  100.       { px py moveto
  101.         ph 15 idiv 1 add
  102.           { pw 0 rlineto
  103.             pw neg 15 rmoveto
  104.           } repeat
  105.      } if
  106.     0 setlinewidth
  107.     stroke
  108.     grestore
  109.   } def
  110.  
  111. /b
  112.   { /col exch def
  113.     /ph exch def
  114.     /pw exch def
  115.     /py exch def
  116.     /px exch def
  117.     newpath
  118.     px py moveto
  119.     pw 0 rlineto
  120.     0 ph rlineto
  121.     pw neg 0 rlineto
  122.     closepath
  123.     col 6 lt {shade} {texture} ifelse
  124.   } def
  125.  
  126. /i
  127.   { /mode exch def
  128.     /ph exch def
  129.     /pw exch def
  130.     /py exch def
  131.     /px exch def
  132.     /picstr 256 string def
  133.     /nofbytes pw 7 add 8 idiv ph mul def
  134.     gsave
  135.     px py translate
  136.     pw 2 mul ph 2 mul  scale
  137.     pw ph 1 [pw 0 0 ph 0 0]
  138.       {nofbytes 256 ge
  139.         { currentfile picstr readhexstring
  140.           /nofbytes nofbytes 256 sub def
  141.           pop
  142.         }
  143.         { /picstr nofbytes string def
  144.           currentfile picstr readhexstring
  145.           pop
  146.           /nofbytes 0 def
  147.         } ifelse
  148.       } image
  149.     grestore
  150.   } def
  151.  
  152. /init
  153.   { .23 .23 scale
  154.     100 50 translate
  155.   } def
  156.  
  157. /p
  158.   { /#copies exch def
  159.     showpage
  160.     init
  161.   } def
  162.  
  163. /map
  164.   { ofnt eq {findfont exch scalefont setfont} {pop pop} ifelse
  165.   } def
  166.  
  167. /f
  168.   { /ofnt exch def
  169.     /Helvetica findfont 41 scalefont setfont    % default font
  170.  
  171.     37 /Helvetica (Syntax10.Scn.Fnt) map
  172.     37 /Helvetica-Oblique (Syntax10i.Scn.Fnt) map
  173.     37 /Helvetica-Bold (Syntax10b.Scn.Fnt) map
  174.  
  175.     44 /Helvetica (Syntax12.Scn.Fnt) map
  176.     44 /Helvetica-Oblique (Syntax12i.Scn.Fnt) map
  177.     44 /Helvetica-Bold (Syntax12b.Scn.Fnt) map
  178.  
  179.     51 /Helvetica (Syntax14.Scn.Fnt) map
  180.     51 /Helvetica-Oblique (Syntax14i.Scn.Fnt) map
  181.     51 /Helvetica-Bold (Syntax14b.Scn.Fnt) map
  182.  
  183.     59 /Helvetica (Syntax16.Scn.Fnt) map
  184.     59 /Helvetica-Oblique (Syntax16i.Scn.Fnt) map
  185.     59 /Helvetica-Bold (Syntax16b.Scn.Fnt) map
  186.  
  187.     88 /Helvetica (Syntax24.Scn.Fnt) map
  188.     88 /Helvetica-Oblique (Syntax24i.Scn.Fnt) map
  189.     88 /Helvetica-Bold (Syntax24b.Scn.Fnt) map
  190.  
  191.     30 /Courier (Gacha10l) map
  192.  
  193.   } def
  194.  
  195. init
  196. % --- end of header
  197.